package Solutions;

public class Solustion14 {
    public static void main(String[] args) {
        Solution014 solution014 = new Solution014();
        solution014.divingBoard(1, 2, 3);
    }
}
class Solution014 {
    public int[] divingBoard(int shorter, int longer, int k) {
        //有k块木板就有k+1种组合方式
        if (k == 0) return new int[0];
        if (longer==shorter){
            //返回k*shorter
            return new int[]{shorter*k};
        }
        int result[]=new int[k+1];
        //计算所有长度
        for (int i = 0; i <= k; i++) {
            result[i]=shorter*(k-i)+i*shorter;
        }

        return result;
    }
}
